#ifndef MTTHREAD_H
#define MTTHREAD_H

#include <QRunnable>
#include "QObject"
#include "QVector"
class Generate :public QObject, public QRunnable
{
    Q_OBJECT
public:
    explicit Generate(QObject *parent = nullptr);
    void revnum(int snum);
    void run() override;//任务实现在这个函数中
private:
    int m_num;

signals:
    void sendArray(QVector<int> nun);
};

class BubbleSort:public QObject, public QRunnable
{
    Q_OBJECT
public:
    explicit BubbleSort(QObject *parent = nullptr);
    void recArray(QVector<int> slist);
    void run() override;//任务实现在这个函数中
private:
    QVector<int> mlist;

signals:
    void finish(QVector<int> list);
};
class QuickSolt :public QObject, public QRunnable
{
    Q_OBJECT
public:
    explicit QuickSolt(QObject *parent = nullptr);
    void recArray(QVector<int> slist);
    void run() override;//任务实现在这个函数中
private:
    QVector<int> mlist;
    int quicksort(QVector<int> &slist,int l,int r);

signals:
    void finish(QVector<int> list);
};


#endif // MTTHREAD_H
